package org.jeecg.common.modules.doctor.service;

import io.swagger.models.auth.In;
import org.jeecg.common.modules.doctor.entity.DoctorRegister;
import org.jeecg.common.modules.doctor.entity.DoctorRegisterRecord;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.common.modules.doctor.vo.DoctorRegisterRecordListVo;
import org.jeecg.common.modules.doctor.vo.DoctorRegisterRecordSysListVo;
import org.jeecg.common.modules.doctor.vo.DoctorRegisterRecordSysSettleVo;
import org.jeecg.common.modules.register.entity.RegisterPatient;

import java.util.List;

/**
 * @Description: doctor_register_record
 * @Author: jeecg-boot
 * @Date:   2020-12-23
 * @Version: V1.0
 */
public interface IDoctorRegisterRecordService extends IService<DoctorRegisterRecord> {

    /**
     * 根据挂号id获取当天某个时间段的挂号数量
     */
    int getRecordCount(String doctorRegisterId);

    /**
     * 检查该用户是否曾成功挂号成功过
     */
    RegisterPatient registerPatientCheck(String openId);

    /**
     * 获取挂号对应的挂号序号
     * @param doctorRegisterId
     * @return
     */
    DoctorRegisterRecord getSureRecord(String doctorRegisterId);

    /**
     * 检查该患者是否预约了同一时间段的号源
     */
    boolean checkRegisterSame(String doctorRegisterId,String openId);

    boolean checkRegisterSame(String doctorRegisterId, String openId, String parentId);

    /**
     * 根据挂号表id查询挂号记录
     */
    boolean checkRegister(String doctorRegisterId,Integer visit_num);

    /**
     * 根据微信用户的openid获取挂号记录组
     */
    List<DoctorRegisterRecordListVo> getRecordByOpenid(String openid,String nowDate,String beforeThirtyDate, String status);

    /**
     * 根据挂号记录id获取挂号记录
     */
    DoctorRegisterRecordListVo getRecordById(String recordId);

    /**
     * 根据挂号记录id获取挂号信息
     */
    DoctorRegister getRegisterByRecordId(String registerId);

    /**
     * 根据挂号id获取挂号记录表信息
     * 检查是否有用户进行了挂号
     */
    List<DoctorRegisterRecord> getRegisterRecordList(String doctorRegisterId);

    /**
     * 根据挂号表id获取所有挂号记录表信息
     */
    List<DoctorRegisterRecord> getRegisterRecordListAll(String doctorRegisterId);

    /**
     * 获取挂号记录列表
     */
    List<DoctorRegisterRecordSysListVo> getRegisterRecordSysList(String doctorName, String patientName, String visitTime, Integer status, Integer dataStart, Integer pageSize);

    /**
     * 获取挂号记录总数
     */
    int getRegisterRecordSysCount(String doctorName, String patientName, String visitTime, Integer status);

    /**
     * 根据挂号记录id获取单条挂号单关联的信息
     */
    DoctorRegisterRecordSysListVo getRegisterRecordSysOne(String recordId);

    /**
     * 根据挂号单获取结算的信息
     */
    DoctorRegisterRecordSysSettleVo getRecordSettle(String recordId);

    /**
     * 检测用户是否已经成功进行了挂号
     * 对当前医生
     */
    DoctorRegisterRecord checkSure(String openId,String doctorRegisterId);

    List<DoctorRegisterRecordListVo>  getRegisterRecordTime(String doctorId, String visitTim, String hospitalId);

    List<DoctorRegisterRecord> getDoctorRegisterRecord(String id);
}
